/******************************************************************************
 * Copyright 2018 The Apollo Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *****************************************************************************/
#pragma once

#include <memory>
#include <string>
#include <vector>

#include "modules/lib/interface/base_fusion_system.h"
#include "modules/lib/interface/base_multisensor_fusion.h"
#include "modules/app/obstacle_multi_sensor_fusion.h"
#include "proto/fusion_component_config.pb.h"
#include "utils/base/object.h"
#include "utils/common/file.h"

namespace fusion {

class FusionComponent {
   public:
    FusionComponent() = default;
    ~FusionComponent() = default;
    bool Init();
    bool Proc();

   private:
    bool InitAlgorithmPlugin();

   private:
    static std::mutex s_mutex_;
    static uint32_t s_seq_num_;

    std::string fusion_name_;
    std::string fusion_method_;
    std::string fusion_main_sensor_;
    bool object_in_roi_check_ = false;
    double radius_for_roi_object_check_ = 0;

    std::unique_ptr<fusion::BaseMultiSensorFusion> fusion_;
};

}  // namespace fusion
